'''
Created on 5/01/2013

@author: Jorge
'''

class FeatureSelector(object):
    '''
    classdocs
    '''
    
    def __init__(self):
        '''
        Constructor
        '''
        self.indexes = None
    
    def get_index_features(self, X, Y):
        raise NotImplementedError( "get_index_features method not implemented" )
    
    
    def calculate_best_features(self, X,Y):
        self.indexes = self.get_index_features(X,Y)
    
    def apply_best_features(self, X):
        new_X = []
        for e in X:
            new_X.append( [f for index,f in enumerate(e) if index in self.indexes ] )
        return new_X